home *** CD-ROM | disk | FTP | other *** search
-
-
-
- iiiillllTTTThhhhrrrreeeeaaaadddd((((3333)))) IIIImmmmaaaaggggeeeeVVVViiiissssiiiioooonnnn LLLLiiiibbbbrrrraaaarrrryyyy CCCC++++++++ RRRReeeeffffeeeerrrreeeennnncccceeee MMMMaaaannnnuuuuaaaallll iiiillllTTTThhhhrrrreeeeaaaadddd((((3333))))
-
-
-
- NNNNAAAAMMMMEEEE
- iiiillllTTTThhhhrrrreeeeaaaadddd - share group process
-
-
- IIIINNNNHHHHEEEERRRRIIIITTTTSSSS FFFFRRRROOOOMMMM
- iflListItem : ilThreadItem
-
-
- HHHHEEEEAAAADDDDEEEERRRR FFFFIIIILLLLEEEE
- #include <il/ilThread.h>
-
-
- CCCCLLLLAAAASSSSSSSS DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
- ilThread is a wrapper class for the sproc() system call.
-
- CCCCLLLLAAAASSSSSSSS MMMMEEEEMMMMBBBBEEEERRRR FFFFUUUUNNNNCCCCTTTTIIIIOOOONNNN SSSSUUUUMMMMMMMMAAAARRRRYYYY
- CCCCoooonnnnssssttttrrrruuuuccccttttoooorrrr
-
- ilThread(ilThreadRtn* rtn, void* arg=NULL)
- ilThread(pid_t pid=0)
-
- SSSSyyyynnnnccccrrrroooonnnniiiizzzzaaaattttiiiioooonnnn mmmmeeeetttthhhhooooddddssss
-
- static int block()
- static int unblock(pid_t pid)
- int unblock()
- static void shutdown()
-
- GGGGeeeetttt////sssseeeetttt mmmmeeeetttthhhhooooddddssss
-
- static pid_t getCurrentPID()
- pid_t getPID()
- static ilThread* getCurrentThread()
- static int numProcessors()
- static ilArena* getArena()
- void setRoutine(ilThreadRtn* rtn, void* arg=NULL) _p_r_o_t_e_c_t_e_d
-
- TTTThhhhrrrreeeeaaaadddd pppprrrriiiivvvvaaaatttteeee mmmmeeeemmmmoooorrrryyyy aaaallllllllooooccccaaaattttiiiioooonnnn
-
- static void allocPrivate(void*& data, int size)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 1111
-
-
-
-
-
-
- iiiillllTTTThhhhrrrreeeeaaaadddd((((3333)))) IIIImmmmaaaaggggeeeeVVVViiiissssiiiioooonnnn LLLLiiiibbbbrrrraaaarrrryyyy CCCC++++++++ RRRReeeeffffeeeerrrreeeennnncccceeee MMMMaaaannnnuuuuaaaallll iiiillllTTTThhhhrrrreeeeaaaadddd((((3333))))
-
-
-
- FFFFUUUUNNNNCCCCTTTTIIIIOOOONNNN DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNNSSSS
- iiiillllTTTThhhhrrrreeeeaaaadddd(((())))
-
- ilThread(ilThreadRtn* rtn, void* arg=NULL)
- ilThread(pid_t pid=0)
-
-
- The first contructor invokes sproc with PR_SADDR to create new
- thread that will start execution at the routine indicate by _r_t_n. The
- routine will be passed _a_r_g as its only parameter. The second
- constructor wraps an ilThread around the existing share group
- process indicated by _p_i_d.
-
- aaaallllllllooooccccPPPPrrrriiiivvvvaaaatttteeee(((())))
-
- static void allocPrivate(void*& data, int size)
-
-
- This static method allocates a piece of thread private data. This
- is a very primitive feature intended for modules that need permanent
- thread private storage; there is no mechanism for freeing the data
- once it is allocated. This routine is race-condition free if used
- as show here:
-
- static void* pvtData=NULL;
- if (pvtData == NULL) ilThread::allocPrivate(pvtData, pvtSize);
-
-
- Although the pvtData pointer will hold the same address for all
- threads, the memory it points to will be private in each thread
- (through the modern miracle of virtual memory mappings).
-
- bbbblllloooocccckkkk(((())))
-
- static int block()
-
-
- This static method blocks the calling thread until uuuunnnnbbbblllloooocccckkkk()ed by
- another thread. It is okay for a thread to be unblocked before it
- has blocked. In this case the thread will no actually block, it will
- just continue executing. This is extremely useful in avoiding nasty
- race conditions.
-
- ggggeeeettttAAAArrrreeeennnnaaaa(((())))
-
- static ilArena* getArena()
-
-
- This static method returns an ilArena shared memory handle that is
- used with the ilSpinLock and ilSemaphore routines by default.
-
-
-
-
-
- PPPPaaaaggggeeee 2222
-
-
-
-
-
-
- iiiillllTTTThhhhrrrreeeeaaaadddd((((3333)))) IIIImmmmaaaaggggeeeeVVVViiiissssiiiioooonnnn LLLLiiiibbbbrrrraaaarrrryyyy CCCC++++++++ RRRReeeeffffeeeerrrreeeennnncccceeee MMMMaaaannnnuuuuaaaallll iiiillllTTTThhhhrrrreeeeaaaadddd((((3333))))
-
-
-
- ggggeeeettttCCCCuuuurrrrrrrreeeennnnttttPPPPIIIIDDDD(((())))
-
- static pid_t getCurrentPID()
-
-
- This is a lightweight static method that returns the pid of the
- current thread.
-
- ggggeeeettttCCCCuuuurrrrrrrreeeennnnttttTTTThhhhrrrreeeeaaaadddd(((())))
-
- static ilThread* getCurrentThread()
-
-
- This static method returns a pointer to the ilThread object
- associated with the calling thread (or NULL if there is none).
-
- ggggeeeettttPPPPIIIIDDDD(((())))
-
- pid_t getPID()
-
-
- This method returns the pid of this thread (the object it is invoked
- on, not the calling thread).
-
- nnnnuuuummmmPPPPrrrroooocccceeeessssssssoooorrrrssss(((())))
-
- static int numProcessors()
-
-
- This static method returns the number of processors on the system
- that the calling process is running on.
-
- sssseeeettttRRRRoooouuuuttttiiiinnnneeee(((())))
-
- void setRoutine(ilThreadRtn* rtn, void* arg=NULL) _p_r_o_t_e_c_t_e_d
-
-
- This method initializes the entry point and argument for a thread.
- This is mainly for use in derived classes.
-
- sssshhhhuuuuttttddddoooowwwwnnnn(((())))
-
- static void shutdown()
-
-
- This method shuts down all of the ilThreads created by this
- application.
-
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 3333
-
-
-
-
-
-
- iiiillllTTTThhhhrrrreeeeaaaadddd((((3333)))) IIIImmmmaaaaggggeeeeVVVViiiissssiiiioooonnnn LLLLiiiibbbbrrrraaaarrrryyyy CCCC++++++++ RRRReeeeffffeeeerrrreeeennnncccceeee MMMMaaaannnnuuuuaaaallll iiiillllTTTThhhhrrrreeeeaaaadddd((((3333))))
-
-
-
- uuuunnnnbbbblllloooocccckkkk(((())))
-
- int unblock()
- static int unblock(pid_t pid)
-
-
- This first version of this routine unblocks the process
- corresponding to this object. This seconv version unblocks the
- process indicate by _p_i_d.
-
- SSSSEEEEEEEE AAAALLLLSSSSOOOO
- ilMpSetMaxProcs(3), IL(1), sproc(1)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 4444
-
-
-
-